package cn.micro.eye.model.vo;

import cn.micro.eye.entity.Area;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
public class MemberInfoVO implements Serializable {

    // === 用户信息

    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long memberId;
    private String memberName;
    private Integer memberCategory;
    private Integer sex;
    private Integer age;
    private String mobile;
    private String headImgUrl;
    private String idCard;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birth;
    private String email;
    private String address;
    /**
     * 所属省份ID
     * {@link Area#code}
     */
    private String provinceCode;
    /**
     * 所属省份名称
     * {@link Area#name}
     */
    private String provinceName;
    /**
     * 所属市ID
     * {@link Area#code}
     */
    private String cityCode;
    /**
     * 所属市名称
     * {@link Area#name}
     */
    private String cityName;
    /**
     * 所属县ID
     * {@link Area#code}
     */
    private String districtCode;
    /**
     * 所属县名称
     * {@link Area#name}
     */
    private String districtName;

    // === 机构信息

    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long organizationId;
    private String organizationName;
    private Integer organizationCategory;

    // === 权限角色

    private List<String> roles = new ArrayList<>();

}
